package com.soft.cqlinglong.oto.web.sitemesh3;

import org.sitemesh.SiteMeshContext;
import org.sitemesh.content.ContentProperty;
import org.sitemesh.content.tagrules.TagRuleBundle;
import org.sitemesh.content.tagrules.html.ExportTagToContentRule;
import org.sitemesh.tagprocessor.State;

/**
 * SiteMesh自定义标签
 * Created by hxq on 2016/7/7.
 */
public class ExtHtmlTagRuleBundle implements TagRuleBundle {
    public void install(State state, ContentProperty contentProperty, SiteMeshContext siteMeshContext) {
        state.addRule("layout_links", new ExportTagToContentRule(siteMeshContext,contentProperty.getChild("layout_links"),false));
        state.addRule("layout_content", new ExportTagToContentRule(siteMeshContext,contentProperty.getChild("layout_content"),false));
        state.addRule("layout_scripts", new ExportTagToContentRule(siteMeshContext,contentProperty.getChild("layout_scripts"),false));
    }

    public void cleanUp(State state, ContentProperty contentProperty, SiteMeshContext siteMeshContext) {

    }
}
